home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 September / GSSH0904CD1.iso / RiseofNations / RedFront / RedFront.exe / Red Front / Red Front - 08 - Stalingrad.bhs < prev    next >
Text File  |  2004-01-28  |  29KB  |  829 lines

  1. /* Red Front
  2.    Stalingrad
  3.    
  4.    These events will control the Stalingrad scenario for the Red Front campaign.
  5.   
  6.    Campaign By: Kevin 'DarthVeda' Chulski
  7.    Contact: darthveda@hotmail.com
  8.    Please email any questions/suggestions/comments that you have!   
  9. */
  10.  
  11. scenario
  12. {
  13.  
  14.   set_nation_name("Russians", $S("Red Army"));
  15.   set_nation_name("Romans", $S("Germans"));
  16.   
  17.   // initialize variables
  18.   
  19.   static int month = 9;
  20.   static int day = 13;
  21.   static int dayRate = 60;
  22.   static int rallyID = 0;
  23.   static int attackMod = 5;
  24.   static int i = 0;
  25.   static int X = 0;
  26.   static int Y = 0;
  27.   static int X2 = 0;
  28.   static int Y2 = 0;  
  29.   static int mouseX = 0;
  30.   static int mouseY = 0;
  31.   
  32.   static int HEAL_IDLE_DELAY = 2;
  33.   
  34.   // shelling
  35.   static int ALL_SHELL_DELAY = 1;
  36.   static int MIN_SHELL = 1;
  37.   static int MAX_SHELL = 2;
  38.   
  39.   // player shelling
  40.   static int give_more_flag = 0;
  41.   static int art_barages = 0;
  42.   static int charges = 0;
  43.   static int ART_RADIUS = 11;
  44.   
  45.   // morale level, etc
  46.   static int moraleLevel = 156;
  47.   static int sovRMod = 0;
  48.   
  49. labels {
  50.   //Add any constant labels here in a comma separated list.
  51.   
  52. }
  53.  
  54. run_once {
  55.   //Insert commands that should be executed only once when the script is loaded here.
  56.   
  57.   //disable weird things
  58.   
  59.   disable_type("Helicopter");
  60.   disable_type("Nuclear Missile");
  61.   disable_type("Missile Silo");
  62.   disable_type("Aircraft Carrier");
  63.   disable_type("Spy");
  64.   
  65.   if ( building_resource_bonus_disable() != 1 )
  66.   {
  67.     print_game_msg( "Error: couldn't disable building resources!" );
  68.   }
  69.   if ( buildings_gather_disable() != 1 )
  70.   {
  71.     print_game_msg( "Error: couldn't disable building gather!" );
  72.   }
  73.   if ( plunder_disable() != 1 )
  74.   {
  75.     print_game_msg( "Error: couldn't disable plunder!" );
  76.   }
  77.   
  78.   
  79.   // disable wonders
  80.   
  81.   disable_type( "Pyramids" );
  82.   disable_type( "Colossus" );
  83.   disable_type( "Terra Cotta Army" );
  84.   disable_type( "Colosseum" );
  85.   disable_type( "Temple of Tikal" );
  86.   disable_type( "Porcelain Tower" );
  87.   disable_type( "Angkor Wat" );
  88.   disable_type( "Versailles" );
  89.   disable_type( "Statue of Liberty" );
  90.   disable_type( "Kremlin" );
  91.   disable_type( "Taj Mahal" );
  92.   disable_type( "Eiffel Tower" );
  93.   disable_type( "Supercollider" );
  94.   disable_type( "Space Program" );
  95.   
  96.   // disable certain buildings and guys
  97.   
  98.   disable_type( "Small City" );
  99.   disable_type( "Citizen" );
  100.   disable_type( "Temple" );
  101.   disable_type( "Library" );
  102.   disable_type( "University" );
  103.   disable_type( "Airbase" );
  104.   disable_type( "Caravan" );
  105.   disable_type( "Supply Wagon" );
  106.   disable_type( "Shipyard" );
  107.   disable_type( "General" );
  108.   
  109.   // disable ships
  110.   
  111.   disable_type("Submarine");
  112.   disable_type("Battleship");
  113.   disable_type("Cruiser");
  114.   
  115.   // Gain Upgrades 
  116.   
  117.   // disable upgrades 
  118.   
  119.   lose_upgrade( 1, "Red Guards Infantry" );
  120.   disable_type( "Red Guards Infantry" );
  121.   
  122.   lose_tech(4, "Allegiance");
  123.   lose_tech(4, "Oath of Fealty");
  124.   lose_tech(4, "Patriotism");
  125.   lose_tech(4, "Nationalism");
  126.   disable_tech(4, "Allegiance");
  127.   
  128.   // set timers
  129.   
  130.   set_timer( "cdar", dayRate );
  131.   set_timer( "allshell", ALL_SHELL_DELAY );
  132.   set_timer( "gerinforce", 15);
  133.   set_timer( "sovinforce", 20);
  134.   set_timer( "reminderForce", 25);
  135.   set_timer( "tankFac", 20 );
  136.     
  137.   // disable triggers
  138.   
  139.   disable_trigger( "player_unleashes" );
  140.   disable_trigger( "mamayev_shell" );
  141.   
  142.   // blurb or cinematic
  143.   
  144.   // miscelaneous  
  145.   
  146.   for( i = 2; i < 5; i++ )
  147.   {
  148.     disable_production_ai( i );
  149.   }
  150.   
  151.   if ( force_transport_ability( 1 ) != 1 )
  152.   {
  153.     print_game_msg( "Error: could not activate transport ability!" );
  154.   }
  155.   
  156.   set_victory_message( "6th Army was Anihilated!" );
  157.   
  158.   set_object_type_max_health( "Market", 10000 );
  159.   set_object_type_max_health( "Granary", 10000 );
  160.   set_object_type_max_health( "Refinery", 15000 );
  161.   set_object_type_max_health( "Smelter", 15000 );
  162.   set_object_type_max_health( "Library", 15000 );
  163.   set_object_type_max_health( "Versailles", 20000 );
  164.        
  165. }
  166.  
  167. //Main script body.
  168. //Add triggers and other commands to be executed each game frame here.
  169. //Use Edit->Insert Trigger Function to select from the list of available functions
  170. //Use Edit->Insert Trigger Block to add a blank trigger block.
  171. //See ./scenario/sample_script.bhs for additional documentation
  172.  
  173.   trigger opening_scene ( )
  174.   {
  175.     set_msg_time(20);//Sets message time to 20 seconds
  176.     move_camera( 94,225 );
  177.     scrolling_lock();//Locks scrolling
  178.     zooming_lock();//Locks zooming
  179.     hotkey_selection_disable();//disables hotkey selection
  180.     ui_hide();//Hides the UI
  181.     mouse_selection_disable();//disables mouse selection
  182.     print_msg( "September 1942 - The Germans stand on the brink of victory once again after a sweeping summer offensive.  The last hope of the Soviet Union sits on the Volga in a city called Stalingrad." ); 
  183.     set_timer( "opener", 10 );
  184.   }
  185.   
  186.   trigger opening_dialog ( timer_expired( "opener" ) )
  187.   {
  188.     move_camera( 275,234 ); //Moves camera from action scene
  189.     set_msg_time( 6 ); //Resets message time to default
  190.     clear_msg(); //clears text
  191.     scrolling_unlock();
  192.     zooming_unlock();
  193.     hotkey_selection_enable();
  194.     mouse_selection_enable();
  195.     ui_show();
  196.     add_objective_text( "Date: September 13, 1942", "date", "null.wav" );
  197.     popup_dialog( "Glorious comrade Stalin has ordered \"not a step back.\"  General, you are to make a stand here, because there simply is nowhere else to retreat.  The Germans must not be allowed to take this city or it will most likely mean the loss of the war.");
  198.     popup_dialog( "NEW OBJECTIVE: Not a step back" );
  199.     add_objective( "Not a step back", "hold", "null.wav" );
  200.     
  201.   }
  202.    
  203.   trigger calendar ( timer_expired( "cdar" ) )
  204.   {  
  205.     // check for month change
  206.     if ( day == 30 && month == 9 )
  207.     {
  208.       day = 1;
  209.       month = 10;
  210.       dayRate = 30;
  211.     }
  212.     else if ( day == 30 && month == 11 )
  213.     {
  214.       day = 1;
  215.       month = 12;
  216.     }
  217.     else if ( day == 31 && month == 12 )
  218.     {
  219.       day = 1;
  220.       month = 1;
  221.     }
  222.     else if ( day == 31 && month == 1 )
  223.     {
  224.       // It's the end of the scenario
  225.       popup_dialog( "German Field Marshal von Paulus surrenders the thousands of troops surrounded at Stalingrad.  Despite the Fuhrer's commands to defend to the last, he realizes the futility of carrying on.  His men, freezing to death and without ammunition are paraded in column through the streets of Stalingrad into custody. " );
  226.       popup_dialog( "Stavka congratulates you on your great victory here but feels you could have pressed the issue against the Germans sooner." );
  227.       popup_dialog( "You are now ready for the ninth part of this campaign.  Please load the next scenario in the Red Front sequence." );
  228.       victory( 1 );
  229.     }
  230.     else if ( day == 31 )
  231.     {
  232.       day = 1;
  233.       month++;
  234.     }
  235.     else
  236.     {
  237.       // no month change, normal increment
  238.       day++;
  239.     }
  240.     
  241.     if ( month == 9 )
  242.     {
  243.       change_objective_text( "date", "Date: September " +day+", 1942" );
  244.     }
  245.     else if ( month == 10 )
  246.     {
  247.       change_objective_text( "date", "Date: October " +day+", 1942" );
  248.     }
  249.     else if ( month == 11 )
  250.     {
  251.       change_objective_text( "date", "Date: November " +day+", 1942" );
  252.     }
  253.     else if ( month == 12 )
  254.     {
  255.       change_objective_text( "date", "Date: December " +day+", 1942" );
  256.     }
  257.     else
  258.     {
  259.       change_objective_text( "date", "Date: January " +day+", 1943" );
  260.     }
  261.     
  262.     // also update the artillery situation
  263.     
  264.     if ( !give_more_flag )
  265.     {
  266.       give_more_flag = 1;
  267.     }
  268.        
  269.     set_timer( "cdar", dayRate );
  270.     enable_trigger( "calendar" );
  271.   } // end of calendar trigger
  272.   
  273.   trigger sep14 ( month == 9 && day == 14 )
  274.   {
  275.     MIN_SHELL = 4;
  276.     MAX_SHELL = 6;
  277.     attackMod = 4;
  278.     set_timer( "m_shell", 1 );
  279.     enable_trigger( "mamayev_shell" );
  280.   }
  281.   
  282.   trigger sep15 ( month == 9 && day == 15 )
  283.   {
  284.     MIN_SHELL = 2;
  285.     MAX_SHELL = 4;
  286.     attackMod = 3;
  287.     disable_trigger( "mamayev_shell" );
  288.   }
  289.   
  290.   trigger univermaag_fighting ( ( is_military_building( 1, 2001 ) != 1 ) && ( month == 9 && day == 21 ) )
  291.   {
  292.     create_unit( 4, 192, 206, "Infantry", 10 );
  293.     group_attack_to_order( 4, 225, 248 );
  294.     attackMod = 2; 
  295.   }
  296.   
  297.   trigger get_that_factory ( month == 9 && day == 27 && ( find_city_owner( "Red October Factory" ) != 4 ) )
  298.   {
  299.     create_unit( 4, 120, 171, "Tank", 10 );
  300.     group_attack_to_order( 4, 197, 114 );
  301.     create_unit( 4, 120, 171, "Armored Scout Car", 5 );;
  302.     group_attack_to_order( 4, 197, 114 );
  303.     popup_dialog( "The Germans have thrown a heavy assault of tanks into the factory district in attempt to take the Red October Factory." );  
  304.   }
  305.   
  306.   trigger orlovka_salient ( month == 9 && day == 29 )
  307.   {
  308.     create_unit( 4, 174, 5, "Infantry", 10 );
  309.     group_attack_to_order( 4, 197, 116 ); 
  310.     create_unit( 4, 122, 6, "Infantry", 10 );
  311.     group_attack_to_order( 4, 146, 22 );  
  312.   }
  313.   
  314.   trigger guards_arrive ( ( month == 10 && day == 13 ) && ( find_city_owner( "Tractory Factory" ) != 4 ) )
  315.   {
  316.     move_camera( 350, 119 );
  317.     create_unit( 1, 350, 119, "Red Guards Infantry", 15);
  318.     group_move_order( 1, 286, 100 );  
  319.     create_unit( 1, 350, 119, "Heavy Machine Gun", 2);
  320.     group_move_order( 1, 286, 100 );  
  321.     popup_dialog( "A guards division has arrived to reinforce the factory area." );
  322.   }
  323.   
  324.   trigger big_badd_attack ( ( month == 10 && day == 14 ) && ( find_city_owner( "Tractor Factory" ) != 4 ) )
  325.   {
  326.     create_unit( 4, 130, 78, "Infantry", 15 );
  327.     group_attack_to_order( 4, 198, 44 );
  328.     popup_dialog( "The Germans have launched a big push against the remaining factory areas." );       
  329.   } 
  330.  
  331.   trigger last_big_push ( month == 11 && day == 11 )
  332.   {
  333.     popup_dialog( "The Germans are making new effort to capture the city; Stavka alerts you to pull all of your manpower into the defense and that failure will not be tolerated. " );
  334.     attackMod = 7;
  335.     MIN_SHELL = 4;
  336.     MAX_SHELL = 6;
  337.   }
  338.   
  339.   trigger end_o_push ( month == 11 && day == 16 )
  340.   {
  341.     attackMod = 1;
  342.     popup_dialog( "After a few days of fighting, the heavy German assault is badly fragmented.  However the volga has begun to freeze which will impeded our reinforcement operations. " );
  343.     sovRMod = 2;
  344.     moraleLevel+=5;
  345.     set_object_type_max_health( "Riflemen", moraleLevel );      
  346.   }
  347.   
  348.   trigger urondon ( month == 11 && day == 19 )
  349.   {
  350.     popup_dialog( "From the north and south of the German lines far behind Stalingrad, Russian armies unleash operation 'Uranus'.  The Italians and Romanians in the rear guard are completely overwhelmed by Red Guards divisions and hundreds of tanks.  The pincer is moving rapidly to enclose the Germans and it is expected that the enemy will be fully surrounded by week's end." );
  351.     attackMod = 0;
  352.     MIN_SHELL = 2;
  353.     MAX_SHELL = 3;
  354.   }
  355.   
  356.   trigger even_more_frozen ( month == 11 && day == 20 )
  357.   {
  358.     sovRMod = 4;
  359.   }
  360.   
  361.   trigger you_are_trapped ( month == 11 && day == 23 )
  362.   {
  363.     popup_dialog( "The German armies attacking Stalingrad are now completely trapped by Soviet forces.  Word has arrived that an entire Romanian army has surrendered. It is expected that the armies of the Axis powers entrapped at Stalingrad will quickly disintegrate as winter sets in." );  
  364.     attackMod = -1;
  365.     MIN_SHELL = 1;
  366.     MAX_SHELL = 2;
  367.     moraleLevel+=5;
  368.     set_object_type_max_health( "Riflemen", moraleLevel );
  369.   }
  370.   
  371.   trigger winter_tempest ( month == 12 && day == 12 )
  372.   {
  373.     popup_dialog( "Comrade general, it seems the Germans are attempting to free their trapped forces at Stalingrad.  They have launched an attempt named 'Winter Storm' to break the ring that surrounds Stalingrad.  Stavka will keep you informed of their progress." );
  374.   }
  375.  
  376.   trigger saturn_on_the_chir ( month == 12 && day == 16 )
  377.   {
  378.     popup_dialog( "Soviet armies South of Stalingrad have launched operation 'Little Saturn' with the objective of blunting the German 'Winter Storm.'");
  379.   }
  380.  
  381.   trigger volga_freezes ( month == 12 && day == 17 )
  382.   {
  383.     popup_dialog( "The Volga has completely frozen over, allowing troops to more readily." );
  384.     sovRMod = 2;
  385.   }
  386.  
  387.   trigger no_more_for_you ( month == 12 && day == 23 )
  388.   {
  389.     popup_dialog( "After a week of fighting, the Germans have given up their attempt to free von Paulus' trapped armies.  The fighting is fierce and Soviet soldiers in Stalingrad can hear the aborted attempt as it crawls to a bloody stop miles from the city.  It seems the timing is right for an offensive against the remaining troops in Stalingrad, comrade general." );
  390.     disable_trigger( "shell_all" );
  391.   }
  392.   
  393.   trigger red_army_unleashed ( month == 1 && day == 9 )
  394.   {
  395.     change_objective_text( "hold", "Drive the Germans out of Stalingrad" );
  396.     create_unit( 1, 10, 327, "Tank", 10 );
  397.     create_unit( 1, 10, 327, "Red Guards Infantry", 20 );
  398.     create_unit( 1, 10, 327, "Artillery", 5 );
  399.     create_unit( 1, 10, 164, "Tank", 10 );
  400.     create_unit( 1, 10, 164, "Red Guards Infantry", 20 );
  401.     create_unit( 1, 10, 164, "Artillery", 5 );
  402.     create_unit( 1, 25, 17, "Tank", 10 );
  403.     create_unit( 1, 25, 17, "Red Guards Infantry", 20 );
  404.     create_unit( 1, 25, 17, "Artillery", 5 );
  405.     for(i = 2018; i < 2022; i++)
  406.     {
  407.       destroy_building( 4, i );
  408.     }
  409.     destroy_building( 4, 2024 );
  410.     moraleLevel+=10;
  411.     set_object_type_max_health( "Riflemen", moraleLevel );
  412.     popup_dialog( "Red Army has begun its offensive on the remaining Germans inside Stalingrad." );
  413.   }
  414.   
  415.   trigger keep_it_coming ( month == 1 && day == 12 )
  416.   {
  417.     create_unit( 1, 10, 327, "Tank", 10 );
  418.     create_unit( 1, 10, 327, "Red Guards Infantry", 20 );
  419.     create_unit( 1, 10, 164, "Tank", 10 );
  420.     create_unit( 1, 10, 164, "Red Guards Infantry", 20 );
  421.     create_unit( 1, 25, 17, "Tank", 10 );
  422.     create_unit( 1, 25, 17, "Red Guards Infantry", 20 );
  423.   }
  424.   
  425.   trigger paulus_promotion ( month == 1 && day == 24 )
  426.   {
  427.     popup_dialog( "Word has arrived that von Paulus has been promoted to Field Marshal and has instructions to defend to the last. " );
  428.     set_leader_name( 4, "Field Marshal von Paulus" );
  429.   }
  430.  
  431.   trigger red_october_falls ( city_assimilate( 4, "Red October Factory" ) )
  432.   {
  433.     popup_dialog( "The Red October factory has fallen, however the Russians have launched the 193rd division to retake the rubble!" );
  434.     create_unit( 1, 290,100, "Riflemen", 30 );
  435.     group_attack_to_order( 1, 197,115 );  
  436.   }
  437.   
  438.   trigger outskirt_fall ( city_assimilate( 4, "Outskirts" ) )
  439.   {
  440.     create_building( 4, 110, 247, "Bunker" );
  441.     create_building( 4, 126, 234, "Bunker" );
  442.     create_building( 4, 110, 231, "Bunker" );
  443.   }
  444.   
  445.   trigger suburb_fall ( city_assimilate( 4, "Suburb" ) )
  446.   {
  447.     create_building( 4, 153, 253, "Bunker" );
  448.     create_building( 4, 156, 237, "Bunker" );
  449.     create_building( 4, 163, 246, "Bunker" );
  450.   }
  451.  
  452.   trigger shell_all ( timer_expired( "allshell" ) )
  453.   {
  454.     // I should note here that the amount of destruction caused by each shell is directly linked to
  455.     // the attack of the unit being killed.  In this case, the attack of the helicopter unit.
  456.     // The actual damage dealt is somewhere around 10% of the attack value of the unit.
  457.        
  458.     rand_seed( time_sec() );
  459.     rallyID = 0;
  460.     
  461.     if ( ( find_city_owner( "Pavlov House" ) == 2 ) || ( find_city_owner( "Tractor Factory" ) == 2 ) )
  462.     {
  463.       // This if loop prevents the shells from falling if Pavlov house or Tractor Factory is not controlled
  464.       // The effect is to prevent the possibility of an infinite loop
  465.       for (i = 0; i < rand_int(MIN_SHELL,MAX_SHELL); i++ )
  466.       {
  467.         do 
  468.         {
  469.         X = rand_int( 88, 245 );
  470.         Y = rand_int( 54, 353 );
  471.         } while ( territory_owner( X, Y ) != 2 ); // Loop while the territory doesn't satisfy this requirement
  472.         create_unit( 4, X, Y, "Helicopter", 1 );
  473.         rallyID = find_unit( 4, "Helicopter" );
  474.         set_unit_scale( 4, rallyID, 0.01);
  475.         kill_unit_type_anim( 4, "Helicopter", 4);
  476.       }
  477.     }
  478.     
  479.     set_timer( "allshell", ALL_SHELL_DELAY );
  480.     enable_trigger( "shell_all" );
  481.   }
  482.   
  483.   trigger mamayev_shell ( timer_expired( "m_shell" ) && ( is_military_building( 1, 2001 ) == 1 ) )
  484.   {
  485.     rallyID = 0;
  486.     
  487.     for (i = 0; i < rand_int(2,3); i++ )
  488.     {
  489.       do 
  490.       {
  491.       X = rand_int( 169, 199 );
  492.       Y = rand_int( 184, 227 );
  493.       } while ( territory_owner( X, Y ) != 1 ); // Loop while the territory doesn't satisfy this requirement
  494.       create_unit( 4, X, Y, "Helicopter", 1 );
  495.       rallyID = find_unit( 4, "Helicopter" );
  496.       set_unit_scale( 4, rallyID, 0.01);
  497.       kill_unit_type_anim( 4, "Helicopter", 4);
  498.     }  
  499.   
  500.     set_timer( "m_shell", ALL_SHELL_DELAY );
  501.     enable_trigger( "mamayev_shell" );
  502.   }
  503.   
  504.   trigger player_shell ( ( ( month == 9 && day == 14 ) || day%7 == 0 ) && give_more_flag )
  505.   {
  506.     art_barages+=2;
  507.     if ( month == 9 && day == 14 ) 
  508.     {
  509.       popup_dialog( "General, our artillery has saved up enough firepower for a few sustained barages.  You can shell the position at the mouse cursor at any time by pressing the 'D' key.  Remember that we can save the ammunition for later." );
  510.       add_objective_text( "Number of artillery barages: " + art_barages, "playerbarage", "null.wav" );
  511.     }
  512.     else
  513.     {
  514.       change_objective_text( "playerbarage", "Number of artillery barages: " + art_barages );
  515.     }
  516.     give_more_flag = 0;
  517.     
  518.     enable_trigger( "player_shell" );
  519.   }
  520.   
  521.   trigger player_toggles ( key_down( "d" ) && ( art_barages > 0 ) && ( charges == 0 ) )
  522.   {
  523.       art_barages--;
  524.       charges = 5;
  525.       
  526.       mouseX = get_mouse_game_x();
  527.       mouseY = get_mouse_game_y();
  528.       
  529.       enable_trigger( "player_unleashes" );
  530.       set_timer( "unleasher", 1 );
  531.       change_objective_text( "playerbarage", "Artillery is busy. (" + art_barages +") barages remaining" );
  532.     
  533.     enable_trigger( "player_toggles" );
  534.   }
  535.   
  536.   trigger player_unleashes ( timer_expired( "unleasher" ) )
  537.   {
  538.   charges--;
  539.   rallyID = 0;
  540.   
  541.     rand_seed( time_sec() );
  542.     for( i = 0; i < 2; i++ )
  543.     {
  544.       // Generate random point
  545.       // Subtract 10 to put it about on target
  546.       X = rand_int( mouseX - 10, mouseX + ART_RADIUS - 10 );
  547.       Y = rand_int( mouseY - 10, mouseY + ART_RADIUS - 10 );
  548.     
  549.       create_unit( 1, X, Y, "Helicopter", 1 );
  550.       rallyID = find_unit( 1, "Helicopter" );
  551.       set_unit_scale( 1, rallyID, 0.01);
  552.       kill_unit_type_anim( 1, "Helicopter", 4);        
  553.     }
  554.   
  555.     
  556.     if ( charges != 0 )
  557.     {
  558.       set_timer( "unleasher", 1 );
  559.       enable_trigger( "player_unleashes" );
  560.     }
  561.     else
  562.     {
  563.       if ( art_barages != 0 )
  564.       {
  565.         change_objective_text( "playerbarage", "Number of artillery barages: " + art_barages );
  566.       }
  567.       else
  568.       {
  569.         change_objective_text( "playerbarage", "No remaining artillery barages available" );
  570.       }
  571.     }
  572.   }
  573.   
  574.   trigger invincible_sol ( )
  575.   {
  576.     int solID = 0;
  577.     
  578.     for( i = 0; i <= num_type( 4, "Statue of Liberty" ); i++ ) 
  579.     {
  580.       solID = find_build( 4, "Statue of Liberty" );
  581.       heal_object( 4, solID, 100);
  582.     }
  583.            
  584.     enable_trigger( "invincible_sol" );
  585.   }
  586.   
  587.   trigger germans_attack ( timer_expired( "gerinforce" ) )
  588.   {
  589.     // This trigger sets the Germans in motion against the Russians
  590.     if ( ( find_city_owner( "Sadovaya Station" ) != 4 ) && is_trigger_enabled( "red_army_unleashed" ) )
  591.     {
  592.       create_unit( 4, 77, 336, "Infantry", 5 );
  593.       group_attack_to_order( 4, 133, 357 ); 
  594.       create_unit( 4, 77, 336, "Tank", 1 );
  595.       group_attack_to_order( 4, 133, 357 );
  596.     }
  597.     else if ( find_city_owner( "No. 2 Station" ) != 4 )
  598.     {
  599.       create_unit( 4, 133, 357, "Infantry", 5 );
  600.       group_attack_to_order( 4, 184, 350 );    
  601.     }
  602.     else if ( find_city_owner( "Grain Elevator" ) != 4 )
  603.     {
  604.       create_unit( 4, 184, 350, "Infantry", 5 );
  605.       group_attack_to_order( 4, 225, 331 );    
  606.     }
  607.     else
  608.     {
  609.       // To Pavlov's House
  610.       create_unit( 4, 225, 331, "Infantry", 5 );
  611.       group_attack_to_order( 4, 229, 267 );    
  612.     }
  613.     
  614.     if ( ( find_city_owner( "Outskirts" ) != 4 )  && is_trigger_enabled( "red_army_unleashed" ) )
  615.     {
  616.       create_unit( 4, 82, 267, "Infantry", 5 + attackMod );
  617.       group_attack_to_order( 4, 120, 237 ); 
  618.     }
  619.     else if ( find_city_owner( "Suburb" ) != 4 )
  620.     {
  621.       create_unit( 4, 120, 337, "Infantry", 4 + attackMod );
  622.       group_attack_to_order( 4, 163, 250 );       
  623.     }
  624.     else if ( find_city_owner( "Central Station" ) != 4 )
  625.     {
  626.       create_unit( 4, 163, 250, "Infantry", 3 + attackMod );
  627.       group_attack_to_order( 4, 190, 276 );       
  628.     }
  629.     else
  630.     {
  631.       // To Pavlov's House
  632.       create_unit( 4, 190, 276, "Infantry", 3 + attackMod );
  633.       group_attack_to_order( 4, 229, 267 );      
  634.     }
  635.     
  636.     if ( month == 12 || month == 1 )
  637.     {
  638.       // Last ditch defenders
  639.       if ( find_city_owner( "Outskirts" ) == 4 )
  640.       {
  641.         create_unit( 4, 120, 337, "Infantry", 2 );
  642.         create_unit( 4, 120, 337, "MG42", 1 );       
  643.       }
  644.       else if ( find_city_owner( "Suburb" ) == 4 )
  645.       {
  646.         create_unit( 4, 163, 250, "Infantry", 2 );
  647.         create_unit( 4, 163, 250, "MG42", 1 );      
  648.       }
  649.       else if ( find_city_owner( "Central Station" ) == 4 )
  650.       {
  651.         // To Pavlov's House
  652.         create_unit( 4, 190, 276, "Infantry", 2 );
  653.         create_unit( 4, 190, 276, "MG42", 1 );    
  654.       }
  655.     }
  656.     
  657.     if ( ( is_military_building( 1, 2001 ) == 1 ) && ( find_city_owner( "Suburb" ) == 4 ) )
  658.     {
  659.       create_unit( 4, 161, 242, "Infantry", 5 + attackMod );
  660.       group_attack_to_order( 4, 192, 206 );
  661.       create_unit( 4, 161, 242, "Howitzer", 1 );
  662.       group_attack_to_order( 4, 192, 206 );         
  663.     }
  664.     
  665.     if ( find_city_owner( "October Settlement" ) != 4 )
  666.     {
  667.       create_unit( 4, 120,171, "Infantry", 5 + attackMod );
  668.       group_attack_to_order( 4, 162, 166 );
  669.       create_unit( 4, 120,171, "Tank", 1 );
  670.       group_attack_to_order( 4, 162, 166 );        
  671.     }
  672.     else if ( find_city_owner( "Sorting Shop" ) != 4 )
  673.     {
  674.       create_unit( 4, 162, 166, "Infantry", 4 + attackMod );
  675.       group_attack_to_order( 4, 196, 144 );
  676.       create_unit( 4, 162, 166, "Tank", 1 );
  677.       group_attack_to_order( 4, 196, 144 );        
  678.     }
  679.     else
  680.     {
  681.       // To Red October Factory
  682.       create_unit( 4, 195, 144, "Infantry", 3  + attackMod );
  683.       group_attack_to_order( 4, 197, 114 );
  684.       create_unit( 4, 195, 144, "Tank", 1 );
  685.       group_attack_to_order( 4, 197, 114 );       
  686.     }    
  687.  
  688.     if ( ( find_city_owner( "Barricades Settlement" ) != 4 )  && is_trigger_enabled( "red_army_unleashed" ) )
  689.     {
  690.       create_unit( 4, 96, 105, "Infantry", 4 + attackMod );
  691.       group_attack_to_order( 4, 159, 119 ); 
  692.     }
  693.     else if ( find_city_owner( "Red October Factory" ) != 4 )
  694.     {
  695.       create_unit( 4, 159, 119, "Infantry", 3 + attackMod );
  696.       group_attack_to_order( 4, 197, 114 );       
  697.     }
  698.     
  699.     if ( ( find_city_owner( "Barricades Settlement" ) == 4 ) && ( find_city_owner( "Minusinsk" ) != 4 ) )
  700.     {
  701.       create_unit( 4, 159, 119, "Infantry", 4 + attackMod );
  702.       group_attack_to_order( 4, 186, 78 ); 
  703.     }
  704.     else if ( ( find_city_owner( "Barricades Settlement" ) == 4 ) && ( find_city_owner( "Tractor Factory" ) != 4 ) )
  705.     {
  706.       create_unit( 4, 186, 78, "Infantry", 3 + attackMod );
  707.       group_attack_to_order( 4, 198, 44 );       
  708.     }    
  709.   
  710.     set_timer( "gerinforce", 60 );
  711.     enable_trigger( "germans_attack" );
  712.   }
  713.   
  714.   trigger remindyou ( timer_expired( "reminderForce" ) )
  715.   {
  716.     move_camera( 353, 260 );
  717.     popup_dialog( "Commander, reinforcements are arriving at Krasnaya Sloboda and across from the factory district.  Ferry them across the river to defense of the city." );
  718.     move_camera( 185, 119 );
  719.     popup_dialog( "Due to orders for no retreat, the factories around Stalingrad are to remain in production.  As long as the Red October factory stands, it will produce tanks for the soldiers of the Motherland." );
  720.   }
  721.   
  722.   trigger soviets_tally_ho ( timer_expired( "sovinforce" ) )
  723.   {
  724.     if ( population( 1 ) <= population_cap( 1 ) )
  725.     {
  726.       // Southern Reinforcements
  727.       create_unit( 1, 353, 260, "Riflemen", 1);
  728.       group_move_order( 1, 292, 239 );
  729.       if ( time_sec() % 30 == 0 )
  730.       {
  731.         create_unit( 1, 353, 260, "Riflemen", 1);
  732.         group_move_order( 1, 292, 239 );    
  733.       }
  734.       if ( time_sec() % 60 == 0 )
  735.       {
  736.         create_unit( 1, 353, 260, "Machine Gun", 1);
  737.         group_move_order( 1, 292, 239 );         
  738.       }
  739.       if ( time_sec() % 120 == 0 )
  740.       {
  741.         create_unit( 1, 353, 260, "Heavy Machine Gun", 1);
  742.         group_move_order( 1, 292, 239 );    
  743.       }
  744.       if ( time_sec() % 60 == 0 )
  745.       {
  746.         create_unit( 1, 353, 260, "Special Forces", 1);
  747.         group_move_order( 1, 292, 239 );        
  748.       }
  749.       
  750.       // Northern reinforcements
  751.       if ( time_sec() % 6 == 0 )
  752.       {
  753.         create_unit( 1, 350, 119, "Riflemen", 1);
  754.         group_move_order( 1, 286, 100 );    
  755.       }
  756.       if ( time_sec() % 120 == 0 )
  757.       {
  758.         create_unit( 1, 350, 119, "Machine Gun", 1);
  759.         group_move_order( 1, 286, 100 );    
  760.       }
  761.       if ( time_sec() % 60 == 0 )
  762.       {
  763.         create_unit( 1, 350, 119, "Special Forces", 1);
  764.         group_move_order( 1, 286, 100 );        
  765.       }
  766.     }
  767.     set_timer( "sovinforce", 2 + sovRMod );
  768.     enable_trigger( "soviets_tally_ho" );
  769.   }
  770.   
  771.   trigger mamayev_falls ( building_destroyed( 1, 2001) )
  772.   {
  773.     move_camera( 191, 209 );
  774.     popup_dialog( "The fortress of Mamayev Kurgan is destroyed by the Germans.  The heights overlooking the city will be an advantage to the Germans." );
  775.     for( i = 2002; i < 2020; i++ )
  776.     {
  777.       destroy_building(1, i);
  778.     }
  779.     MAX_SHELL+=2;
  780.     
  781.     moraleLevel-=5;
  782.     set_object_type_max_health( "Riflemen", moraleLevel );
  783.   }
  784.   
  785.   trigger docks_fall ( city_assimilate( 4, "Docks" ) )
  786.   {
  787.     popup_dialog( "The Docks of Stalingrad fall to advancing Germans.  The loss of a major rally point has a marked effect on the morale of Russian troops. " );
  788.     moraleLevel-=5;
  789.     set_object_type_max_health( "Riflemen", moraleLevel );
  790.   }
  791.   
  792.   trigger red_october ( timer_expired( "tankFac" ) && find_city_owner( "Red October Factory" ) == 2 )
  793.   {
  794.     create_unit( 1, 185, 119, "Tank", 1);
  795.     
  796.     set_timer( "tankFac", 20 );
  797.     enable_trigger( "red_october" );
  798.   }
  799.   
  800.   trigger aleks_falls ( city_assimilate( 1, "Aleksandrova" ) )
  801.   {
  802.     set_good( 1, "Food", 0 );
  803.     set_good( 1, "Timber", 0 );
  804.     set_good( 1, "Metal", 0 );
  805.     set_good( 1, "Oil", 0 );
  806.     set_good( 1, "Wealth", 0 );
  807.     set_good( 1, "Knowledge", 0 );
  808.   }
  809.   
  810.   trigger goin_down_in_flames ( is_defeated( 2 ) )
  811.   {
  812.     // Damn! This sucks!
  813.     remove_objective( "killofficers" );
  814.     remove_objective( "hold" );
  815.     remove_objective( "playerbarage" );
  816.     popup_dialog( "Stalingrad has fallen general, and likely the whole of the Soviet Union with it.  Stalin has personally called for your immediate resignation.  Stavka has supplied you a gun with a single bullet." );
  817.     defeat( 1 );
  818.   }
  819.   
  820.   trigger oh_my_baby ( num_cities( 4 ) <= 2 && ( month == 12 || month == 1 ) )
  821.   {
  822.     popup_dialog( "Paulus' troops, starving, freezing, and without ammunition, give up in the face of a hopeless defense against an overpoweringly resurgent Red Army." );
  823.     popup_dialog( "The battle of Stalingrad is a disastrous defeat for the Axis.  The German 6th field army, 4th panzer army, 3rd and 4th Romanian, and 8th Italian armies were destroyed in the conflagration.  All told the Axis powers have lost nearly a million and a half men trying to take Stalingrad. ");
  824.     popup_dialog( "This is a momentous event for the Motherland, comrade general!  The armies of the Germans have been dealt a devestating defeat, and the Soviet Union is saved.  However general, many armies of the German invader remain on our soil.  It will be your work to remove them.  Well done!" );
  825.     popup_dialog( "You are now ready for the ninth part of this campaign.  Please load the next scenario in the Red Front sequence." );
  826.     victory( 1 );
  827.   }
  828.   
  829. }